]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupSwitchMenuItem: Emit correct switch state with toggled signal
authorAndrew Zaech <azaech021@gmail.com>
Sun, 29 Sep 2024 22:43:15 +0000 (22:43 +0000)
committerAndrew Zaech <azaech021@gmail.com>
Sun, 29 Sep 2024 22:43:15 +0000 (22:43 +0000)
The toggled signal was incorrectly emitting the pspec instead of the switch state.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7943

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3493>

js/ui/popupMenu.js

index cf0406ca7b2f476e513632f51be368cbf3608d9b..e0693709ad6f190ec9c605f9f0a14a8b51eebb29 100644 (file)
@@ -607,8 +607,8 @@ export const PopupSwitchMenuItem = GObject.registerClass({
         this.checkAccessibleState();
     }
 
-    _onToggled(sw, state) {
-        this.emit('toggled', state);
+    _onToggled() {
+        this.emit('toggled', this._switch.state);
         this.checkAccessibleState();
     }